home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
etc
/
RCS
/
insque.c,v
< prev
next >
Wrap
Text File
|
1992-11-21
|
2KB
|
97 lines
head 1.2;
branch ;
access ;
symbols ;
locks ; strict;
comment @ * @;
1.2
date 92.11.21.18.25.47; author mottsmth; state Exp;
branches ;
next 1.1;
1.1
date 92.11.21.18.21.56; author mottsmth; state Exp;
branches ;
next ;
desc
@Generic Queue Insertion
@
1.2
log
@Function return type was struct qelem,
not int, due to missing semi-colon !!!
@
text
@/*
* insque.c --
*
* Source code for the "insque" library procedure.
*
* Copyright 1988 Regents of the University of California
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*/
#ifndef lint
static char rcsid[] = "$Header: /sprite/src/lib/c/etc/RCS/insque.c,v 1.1 92/11/21 18:21:56 mottsmth Exp Locker: mottsmth $ SPRITE (Berkeley)";
#endif not lint
struct qelem {
struct qelem *q_forw;
struct qelem *q_back;
char q_data[4];
};
/*
*----------------------------------------------------------------------
*
* insque --
*
* Insert a new element into a queue after a given predecessor.
*
* Results:
* None.
*
* Side effects:
* Elem is linked in after pred.
*
*----------------------------------------------------------------------
*/
insque(elem, pred)
register struct qelem *elem;
register struct qelem *pred;
{
elem->q_forw = pred->q_forw;
elem->q_back = pred;
pred->q_forw = elem;
elem->q_forw->q_back = elem;
}
@
1.1
log
@Initial revision
@
text
@d17 1
a17 1
static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
d24 1
a24 1
}
@